"use strict";
cc._RF.push(module, '6ede1lrUyJKG43/vR0bFL0z', 'ResourceManager');
// eazax-ccc/core/ResourceManager.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * 资源管理器
 */
var ResourceManager = /** @class */ (function () {
    function ResourceManager() {
    }
    Object.defineProperty(ResourceManager, "resMap", {
        get: function () { return this._resMap; },
        enumerable: false,
        configurable: true
    });
    ResourceManager.load = function (path) {
        var _this = this;
        return new Promise(function (res) {
            var cache = _this._resMap.get(path);
            if (cache) {
                return res(cache);
            }
            cc.resources.load(path, function (error, asset) {
                if (error) {
                    cc.log('[ResourceManager]', '加载失败', path);
                    return res(null);
                }
                _this._resMap.set(path, asset);
                res(asset);
            });
        });
    };
    ResourceManager.get = function (path) {
        return this._resMap.get(path);
    };
    ResourceManager.has = function (path) {
        return this._resMap.has(path);
    };
    ResourceManager.release = function () {
    };
    ResourceManager.getDepsRecursively = function (uuid) {
        return cc.assetManager.dependUtil.getDepsRecursively(uuid);
    };
    ResourceManager._resMap = new Map();
    return ResourceManager;
}());
exports.default = ResourceManager;

cc._RF.pop();